package com.soul.interceptors;

import com.soul.cache.Cache;
import com.soul.interceptor.Interceptor;
import com.soul.net.Request;
import com.soul.net.Response;
import com.soul.net.http.HttpRequest;

public class TokenInterceptor implements Interceptor {
    
    @Override
    public void preRequest(Request request) {
        if (Cache.token != null){
            ((HttpRequest)request).putHeader("TOKEN",Cache.token);
        }
    }

    @Override
    public void postRequest(Request request, Response response) {

    }
}
